/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainGuiForm.java
 *
 * Created on 12.01.2010., 02.19.16
 */

package xmlcollabclient.staro;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;
import javax.swing.*;

/**
 *
 * @author Runner
 */
public class MainGuiForm extends javax.swing.JFrame {

    /** Creates new form MainGuiForm */
    public MainGuiForm() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new JPanel();
        jButton1 = new JButton();
        jButton2 = new JButton();
        jPanel2 = new JPanel();
        jCheckBox1 = new JCheckBox();
        jCheckBox2 = new JCheckBox();
        jCheckBox3 = new JCheckBox();
        jCheckBox4 = new JCheckBox();

        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setBounds(new Rectangle(450, 250, 0, 0));

        jPanel1.setLayout(new FlowLayout(FlowLayout.LEFT));

        jButton1.setIcon(new ImageIcon(getClass().getResource("/xmlcollabclient/icons/arrow-circle-225.png"))); // NOI18N
        jButton1.setToolTipText("Refresh");
        jButton1.setHorizontalTextPosition(SwingConstants.CENTER);
        jButton1.setVerticalTextPosition(SwingConstants.BOTTOM);
        jButton1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jPanel1.add(jButton1);

        jButton2.setIcon(new ImageIcon(getClass().getResource("/xmlcollabclient/icons/clipboard--plus.png"))); // NOI18N
        jButton2.setToolTipText("Add new task");
        jButton2.setHorizontalTextPosition(SwingConstants.CENTER);
        jButton2.setVerticalTextPosition(SwingConstants.BOTTOM);
        jPanel1.add(jButton2);

        getContentPane().add(jPanel1, BorderLayout.NORTH);

        jPanel2.setBorder(BorderFactory.createTitledBorder("Task list"));
        jPanel2.setLayout(new BoxLayout(jPanel2, BoxLayout.Y_AXIS));

        jCheckBox1.setText("Napraviti forme za glavni GUI i dodeljivanje zadataka");
        jCheckBox1.setBorderPaintedFlat(true);
        jCheckBox1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                jCheckBox1ActionPerformed(evt);
            }
        });
        jPanel2.add(jCheckBox1);

        jCheckBox2.setText("Srediti formu za Login");
        jCheckBox2.setBorderPaintedFlat(true);
        jCheckBox2.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                jCheckBox2ActionPerformed(evt);
            }
        });
        jPanel2.add(jCheckBox2);

        jCheckBox3.setText("Klikom na dugme \"Refresh\" brisu se svi taskovi iz Task liste");
        jCheckBox3.setBorderPaintedFlat(true);
        jCheckBox3.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                jCheckBox3ActionPerformed(evt);
            }
        });
        jPanel2.add(jCheckBox3);

        jCheckBox4.setText("Klikom na neki od CheckBoxeva on nestaje iz Task liste");
        jCheckBox4.setBorderPaintedFlat(true);
        jCheckBox4.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                jCheckBox4ActionPerformed(evt);
            }
        });
        jPanel2.add(jCheckBox4);

        getContentPane().add(jPanel2, BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jCheckBox1ActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
        jPanel2.remove(jCheckBox1);
        jPanel2.revalidate();
        jPanel2.repaint();
    }//GEN-LAST:event_jCheckBox1ActionPerformed

    private void jCheckBox2ActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed
        jPanel2.remove(jCheckBox2);
        jPanel2.revalidate();
        jPanel2.repaint();
    }//GEN-LAST:event_jCheckBox2ActionPerformed

    private void jCheckBox3ActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jCheckBox3ActionPerformed
        jPanel2.remove(jCheckBox3);
        jPanel2.revalidate();
        jPanel2.repaint();
    }//GEN-LAST:event_jCheckBox3ActionPerformed

    private void jCheckBox4ActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jCheckBox4ActionPerformed
        jPanel2.remove(jCheckBox4);
        jPanel2.revalidate();
        jPanel2.repaint();
    }//GEN-LAST:event_jCheckBox4ActionPerformed

    private void jButton1ActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        jPanel2.removeAll();
        jPanel2.revalidate();
        jPanel2.repaint();
    }//GEN-LAST:event_jButton1ActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) throws Exception {
        try {
                // Set cross-platform Java L&F (also called "Metal")
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        }
        catch (UnsupportedLookAndFeelException e) {
           // handle exception
        }
        catch (ClassNotFoundException e) {
           // handle exception
        }
        catch (InstantiationException e) {
           // handle exception
        }
        catch (IllegalAccessException e) {
           // handle exception
        }

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainGuiForm().setVisible(true);
            }
        });

    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private JButton jButton1;
    private JButton jButton2;
    private JCheckBox jCheckBox1;
    private JCheckBox jCheckBox2;
    private JCheckBox jCheckBox3;
    private JCheckBox jCheckBox4;
    private JPanel jPanel1;
    private JPanel jPanel2;
    // End of variables declaration//GEN-END:variables

}
